<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>个人信息</title>
	<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/midi/css/vip.css"/>
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/midi/css/initialize.css"/>
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/midi/css/public.css"/>
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/midi/css/validform.css"/>
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/midi/css/jquery-ui.min.css"/>
	<script src="__PUBLIC__/midi/js/jquery-2.2.3 (1).js"></script>
	<script src="__PUBLIC__/midi/js/public.js"></script>
	<script src="__PUBLIC__/midi/js/swiper-3.4.2.jquery.min.js"></script>
	<script src="__PUBLIC__/midi/js/validform.js"></script>
	<script src="__PUBLIC__/midi/js/jquery-ui.min.js"></script>
</head>
<body>
<!--头部导航栏开始-->
<include file="Public/header" />
<!--头部导航栏结束-->
<div class="shipin-datails">
	<div class="con">
		<div class="inner">
			<i></i>
			<span>当前位置： 会员中心 &gt; 个人信息</span>
		</div>
	</div>
</div>
<div class="wiezhi">
	<div class="con">
		<span>当前位置： 会员中心 &gt; 个人信息</span>
	</div>
</div>
<!--会员页的主要内容-->
<div class="wrapper">
	<aside>
		<div class="con">
			<div class="title">
				<h2>个人中心</h2><input type="radio" /><span></span>
			</div>
			<ul class="first">
				<li class="active"><a href="{:U('Home/Index/userinfo')}">个人信息</a></li>
				<li><a href="{:U('Home/Index/vip_pwd')}">密码修改</a></li>
			</ul>
			<div class="title">
				<h2>系统信息</h2><input type="radio" /><span></span>
			</div>
			<ul class="first">
				<li><a href="{:U('Home/Order/orderList')}">我的订单</a></li>
				<li><a href="{:U('Home/Index/vip_address')}">收货地址</a></li>
			</ul>
		</div>
	</aside>
	<div class="content">
		<div class="hd">
			<h2>个人信息</h2>
		</div>
		<div class="userinfo">
			<form class="registerform" method="post" enctype="multipart/form-data">
				<dl class="clearFix">
					<dt>昵称</dt>
					<dd><input name="user_nickname" value="{$info['user_nickname']}" type="text" datatype="*"/></dd>
				</dl>
				<dl class="clearFix user-icon">
					<dt>头像</dt>
					<dd>
						<span class="icon"><img src="__ROOT__{$info['user_avatar']}" class="icon-img"/></span>
						<span class="zenjia">
							<input type="file" name="file" class="doc" />
							<img src="__PUBLIC__/midi/img/tianjiatupian.png"/>
						</span>
					</dd>
				</dl>
				<dl class="clearFix sex">
					<dt>性别</dt>
					<dd>
						<label>
							<span class="cssradio">
								<input type="radio" name="user_sex" value="1" <if condition="$info['user_sex'] eq 1">checked="true"</if>  datatype="*"/>
								<span></span>
							</span>
							男
						</label>
						<label>
							<span class="cssradio">
								<input type="radio" name="user_sex" <if condition="$info['user_sex'] eq 2">checked="true"</if> value="2" />
								<span></span>
							</span>
							女
						</label>
					</dd>
				</dl>
				<dl class="clearFix">
					<dt>出生日期</dt>
					<dd><input type="text" name="user_birthday" value="{$info['user_birthday']}" datatype="*" id="datepicker"/></dd>
				</dl>
				<dl class="clearFix">
					<dt>民族</dt>
					<dd><input type="text" name="user_nation" value="{$info['user_nation']}" datatype="*"/></dd>
				</dl>
				<dl class="clearFix">
					<dt>邮箱</dt>
					<dd><input type="text" name="user_email" value="{$info['user_email']}" datatype="e"/></dd>
				</dl>
				<input class="button" type="submit" value="修改" />
			</form>
		</div>
	</div>
</div>
<!--会员页的主要内容结束-->
<script>
    function getObjectURL(file){
        var url = null;
        if(window.createObjectURL != undefined){
            url = window.createObjectURL(file);
        }else if(window.URL != undefined){
            url = window.URL.createObjectURL(file);
        }else if(window.webkitURL != undefined){
            url = window.webkitURL.createObjectURL(file);
        }
        return url;
    }
    $(function(){
        $.Tipmsg.tit="错误提示";
        var demo=$(".registerform").Validform({
            beforeSubmit:function(curform){
                $(":submit",this).attr("disabled","disabled");
            },
        });
        demo.tipmsg.s="请输入信息";
        $(".doc").on("change",function(){
            var srcs = getObjectURL(this.files[0]);
            $(this).parents(".user-icon").find(".icon-img").attr("src",srcs);
        });
        $("#datepicker").datepicker({
            prevText: '<上月',
            nextText: '下月>',
            numberOfMonths:1,//显示几个月
            showButtonPanel:true,//是否显示按钮面板
            dateFormat: 'yy-mm-dd',//日期格式
            clearText:"清除",//清除日期的按钮名称
            closeText:"关闭",//关闭选择框的按钮名称
            yearSuffix: '年', //年的后缀
            showMonthAfterYear:true,//是否把月放在年的后面
            monthNames: ['一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月'],
            dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
            dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
            dayNamesMin: ['日','一','二','三','四','五','六'],
        });
    })
</script>
</body>
</html>
